package cn.com.homeyoda.aimate.aihealth.manager;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import cn.com.homeyoda.aimate.aihealth.bean.ChronicDiseaseItemBean;
import cn.com.homeyoda.aimate.aihealth.bean.MyselfPlanBean;
import cn.com.homeyoda.aimate.aihealth.bean.PopularListBean;

/**
 * 用于管理用户基本信息
 */
public class UserInfoManager {

    private static UserInfoManager self = null;


    public HashMap<Integer,ChronicDiseaseItemBean.DataBean> chronicDiseaseMap = new HashMap<>();


    public MyselfPlanBean.DataBean getSelfSportPlan() {
        return selfSportPlan;
    }

    public void setSelfSportPlan(MyselfPlanBean.DataBean selfSportPlan) {
        this.selfSportPlan = selfSportPlan;
    }

    // 加入运动计划的时间，为空时代表没有加入
    public MyselfPlanBean.DataBean selfSportPlan = null;

    public List<PopularListBean.RowsBean> rowsBeanList = new ArrayList<>();

    private UserInfoManager() {

    }

    public static UserInfoManager getInstance() {
        if (self == null) {
            self = new UserInfoManager();
        }

        return self;
    }


    public boolean isJoinPlan() {
        return selfSportPlan != null;
    }


    public void setKePuData(List<PopularListBean.RowsBean> rowsBeans) {
        rowsBeanList.clear();
        rowsBeanList.addAll(rowsBeans);
    }

    public List<PopularListBean.RowsBean> getKePuData() {
        return rowsBeanList;
    }

}
